#ifndef MYBATTERY_H
#define MYBATTERY_H

#include <QWidget>
#include <QColor>

class MyBattery : public QWidget
{
    Q_OBJECT
public:
    explicit MyBattery(QWidget *parent = nullptr);

    int powerLevel() const;
    void setPowerLevel(int powerLevel);

    int warning() const;
    void setWarning(int warning);

protected:
    void paintEvent(QPaintEvent *event) override;

signals:

private:
    QColor mColorBackGroud = Qt::white;
    QColor mColorBorder = Qt::black;
    QColor mColorPowerHealthy = Qt::green;
    QColor mColorPowerWarning = Qt::red;
    int mPowerLevel = 50;
    int mWarning = 20;
};

#endif // MYBATTERY_H
